<template>
  <transition name="fade" >
    <div class="layui-layer-tips layui-edit-face" v-show="isShow">
      <div class="content">
        <ul class="layui-clear">
          <li v-for="(item,index) in list" :key="'face'+index" @click="handleClick(item,index)">
            <img :src="item" />
          </li>
        </ul>
      </div>
    </div>
  </transition>
</template>

<script>
import faces from '@/assets/js/face'
export default {
  name: 'face',
  props: {
    isShow: {
      default: false
    }
  },
  data () {
    return {
      list: faces
    }
  },
  methods: {
    handleClick (item, index) {
      this.$emit('clickEvent', index)
      this.$emit('cancel')
    }
  }
}
</script>

<style lang="scss" scoped>
.layui-edit-face{
  position: absolute;
  top: 45px;
  left: 0
}
</style>
